<extend name="Layout:base_list" />
<block name="body_content_block">
    <table id="main_grid" class="easyui-datagrid" data-url="{:U('Admin/get_admin_list_json')}"></table>
    <div id="tb" style="padding:2px 5px;">
        <div style="margin-bottom: 5px; border-bottom:solid 1px #dddddd;">
            <a href="{:U('Admin/admin_edit')}" class="easyui-linkbutton lnk_grid_add" iconCls="icon-add" plain="true">新增</a>
            <a href="{:U('Admin/admin_edit','id=varid')}" class="easyui-linkbutton lnk_grid_edit" iconCls="icon-edit" plain="true" data-title="编辑 {user_name}">编辑</a>
            <a href="{:U('Admin/admin_delete','id=varid')}" class="easyui-linkbutton lnk_grid_remove" iconCls="icon-remove" plain="true" data-prompt-value="zhan123">删除</a>
            <a href="{:U('Admin/admin_role','id=varid')}" class="easyui-linkbutton lnk_grid_edit" iconCls="icon-card" plain="true" data-title="编辑角色 {user_name}">角色</a>
            <a href="{:U('Admin/admin_export')}" class="easyui-linkbutton" iconCls="icon-save" plain="true">导出</a>
            <a href="#" class="easyui-linkbutton lnk_grid_search" iconCls="icon-search" plain="true">搜索</a>
        </div>
    </div>
    <!--隐藏区域-->
    <div style="display:none">
        <!--表格查询对话框-->
        <div id="dlg_search" style="padding:10px">
            <form method="get" action="{:U('Admin/get_admin_list_json')}" data-export-url="{:U('Admin/admin_export')}">
                用户名 <input name="userName" class="easyui-textbox">
                创建时间: <input name="createdTime" class="easyui-datebox">
                付费方式： 
                <select name="payType" class="easyui-combobox">
                    <option value="1">预付费</option>
                    <option value="0">后付费</option>
                </select>
            </form>
        </div>
        <!--/表格查询对话框-->
    </div>
    <!--/隐藏区域-->
</block>
<block name="body_after_block">
    <script type="text/javascript">         
        // 页面初始化
        curd_grid.set_grid_config({
            title: '管理员管理',
            toolbar: '#tb',
            columns: [[
                    {field: 'ck', checkbox: true},
                    {title: "用户名", field: "user_name", sortable: true},
                    {title: "姓名", field: "personal_name"},
                    {title: "联系电话", field: "telphone", sortable: true},
                    {title: "角色", field: "role_text", sortable: true},
                    {title: "状态", field: "user_state_text", sortable: true},
                    {title: "在线状态", field: "online_state_text", sortable: true},
                    {title: "登录次数", field: "login_count", sortable: true},
                    {title: "创建时间", field: "create_time", sortable: true},
                    {title: "编号", field: "id", hidden: true},
                ]],
            rowStyler: function (index, row) {
                if (row.user_state == '0') {
                    return 'background-color:#d1dee6;';
                }
            }
        });
        curd_grid.init();
    </script>
</block>